<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<h:head>
	<h:outputStylesheet library="css" name="principal.css"></h:outputStylesheet>
</h:head>

<ui:composition template="_templateFluxo.xhtml">

	<ui:define name="conteudo">
	<h:body id="body">
		<div id="panelFluxo">
			<p:panel header="Cadastro Empresa">

				<h:form>

					<h:panelGrid id="grid" columns="3" cellpadding="5">

						<p:outputLabel value="Nome: " for="nome" />
						<p:inputText id="nome" size="20" value="#{empresaBean.empresa.nomeFantasia}" required="true" label="Nome "/>
						<p:message for="nome"/>

						<p:outputLabel value="Endereço: " for="endereco" />
						<p:inputText id="endereco" size="20" value="#{empresaBean.empresa.endereco}" required="true" label="Endereço "/>
						<p:message for="endereco"/>

						<p:outputLabel value="Telefone:  " for="telefone" />
						<p:inputMask id="telefone" size="15" value="#{empresaBean.empresa.telefone}"  mask="(99) 9999-9999" required="true" label="Telefone "/>
						<p:message for="telefone"/>

						<p:outputLabel value="E-mail: " for="email" />
						<p:inputText id="email" size="30" value="#{empresaBean.empresa.email}" required="true" label="E-mail "/>
						<p:message for="email"/>

					</h:panelGrid>



					<h:panelGrid columns="2">
						<p:commandButton value="Inserir"
							actionListener="#{empresaBean.adicionaEmpresa}"  action="cadastro_funcionario_fluxo" ajax="true" validateClient="true" update="grid"/>
							
						<p:commandButton value="Limpar" type="reset" />
					</h:panelGrid>
				</h:form>
			</p:panel>
		</div>
		
		</h:body>
	</ui:define>

</ui:composition>
</html>